/* 
#include<iostream> 
using namespace std;

void fun()
{
     static int a = 1;
     int i = 5;
     a++;
     i++;
     cout<<"i="<<i<<"a=" <<a<<endl; 
} 

int main()
{
    fun();
    fun();
    system("pause")    ;
    return 0; 
} 
*/

#include<iostream> 
using namespace std;

int i=1; 

void other(void) 
{
     static int a=2;
     static int b;
     int c = 10;
     a=a+2;
     i=i+32;
     c=c+5;
     cout<<"--other---\n" ;
     cout<<"i:" <<i<<"a:" <<a<<"b:" <<b<<"c:" <<c<<endl;
     b=a; 
} 

int main()
{
    static int a;
    int b = -10;
    int c = 0;
    void other(void);
    cout<<"--MAIN--\n" ;
    cout<<"i:" <<i<<"a:" <<a<<"b:" <<b<<"c:" <<c<<endl;
    c=c+8;
    other();
    cout<<"--MAIN---\n" ;
    cout<<"i:" <<i<<"a:" <<a<<"b:" <<b<<"c:" <<c<<endl;
    i=i+10;
    other();
    system("pause") ;
    return 0; 
} 
